package com.dodoke.day03;

public class Work2 {
    public static void main(String[] args) {
        int[][]totals ={{22,66,44},{77,33,88},{25,45,65},{11,66,99}};
        int total = 0;
        int count = 0;
        for (int i = 0; i < totals.length; i++) {
            int sum = 0 ;
            for (int j = 0; j < totals[i].length; j++) {
                sum += totals[i][j];
                count++;
            }
            System.out.println(String.format("第%d个季度的总和为：%d,平均数：%d", i+1,sum , sum/totals[i].length));
            total += sum;
        }
        System.out.println(String.format("总数是：%d,平均数是：%d", total,total/count));

    }
}
